﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WF.Model;
using WF.DAL;
using WF.Common;

namespace WF.BusinessObject
{
    public class Employee : BOBase<WF.Model.EmployeeEntity, DAL.Employee>
    {
        #region 构造函数


        public Employee() : base() { }
        public Employee(WFDBDataContext DataContext) : base(DataContext) { }
        #endregion

        #region 实现基类abstract方法
        /// <summary>
        /// 实现基类的GetById abstract方法
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public override EmployeeEntity GetById(string ID)
        {
            var obj = DataContext.Employees.SingleOrDefault(o => o.EmpID == ID);
            return new EmployeeEntity(obj);
        }
        #endregion
    }
}
